﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace Ice.Toolkit.Data.Entity
{
    public class EntityColumn : Attribute
    {
        private bool _isIdentity = false;
        private DbType _dbType = DbType.String;
        private int _dbLength = -1;
        private string _dbColumn = String.Empty;

        /// <summary>
        /// 是否为主键ID
        /// </summary>
        public Boolean IsIdentity { get { return _isIdentity; } set { _isIdentity = value; } }
        /// <summary>
        /// 数据类型
        /// </summary>
        public DbType DbType { get { return _dbType; } set { _dbType = value; } }
        /// <summary>
        /// 字段长度
        /// </summary>
        public Int32 DbLength { get { return _dbLength; } set { _dbLength = value; } }
        /// <summary>
        /// 数据库对应的列名
        /// </summary>
        public string DbColumn { get { return _dbColumn; } set { _dbColumn = value; } }
    }
}
